\(\int \frac {a+b x^2+c x^4}{\sqrt {d+e x^2}} \, dx\) [279]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [F(-2)]
   Giac [A] (verification not implemented)
   Mupad [F(-1)]

Optimal result

Integrand size = 24, antiderivative size = 97 \[ \int \frac {a+b x^2+c x^4}{\sqrt {d+e x^2}} \, dx=-\frac {(3 c d-4 b e) x \sqrt {d+e x^2}}{8 e^2}+\frac {c x^3 \sqrt {d+e x^2}}{4 e}+\frac {\left (3 c d^2-4 b d e+8 a e^2\right ) \text {arctanh}\left (\frac {\sqrt {e} x}{\sqrt {d+e x^2}}\right )}{8 e^{5/2}} \]

[Out]

1/8*(8*a*e^2-4*b*d*e+3*c*d^2)*arctanh(x*e^(1/2)/(e*x^2+d)^(1/2))/e^(5/2)-1/8*(-4*b*e+3*c*d)*x*(e*x^2+d)^(1/2)/
e^2+1/4*c*x^3*(e*x^2+d)^(1/2)/e

Rubi [A] (verified)

Time = 0.04 (sec) , antiderivative size = 97, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {1173, 396, 223, 212} \[ \int \frac {a+b x^2+c x^4}{\sqrt {d+e x^2}} \, dx=\frac {\text {arctanh}\left (\frac {\sqrt {e} x}{\sqrt {d+e x^2}}\right ) \left (8 a e^2-4 b d e+3 c d^2\right )}{8 e^{5/2}}-\frac {x \sqrt {d+e x^2} (3 c d-4 b e)}{8 e^2}+\frac {c x^3 \sqrt {d+e x^2}}{4 e} \]

[In]

Int[(a + b*x^2 + c*x^4)/Sqrt[d + e*x^2],x]

[Out]

-1/8*((3*c*d - 4*b*e)*x*Sqrt[d + e*x^2])/e^2 + (c*x^3*Sqrt[d + e*x^2])/(4*e) + ((3*c*d^2 - 4*b*d*e + 8*a*e^2)*
ArcTanh[(Sqrt[e]*x)/Sqrt[d + e*x^2]])/(8*e^(5/2))

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 223

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a,
b}, x] &&  !GtQ[a, 0]

Rule 396

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[d*x*((a + b*x^n)^(p + 1)/(b*(n*(
p + 1) + 1))), x] - Dist[(a*d - b*c*(n*(p + 1) + 1))/(b*(n*(p + 1) + 1)), Int[(a + b*x^n)^p, x], x] /; FreeQ[{
a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && NeQ[n*(p + 1) + 1, 0]

Rule 1173

Int[((d_) + (e_.)*(x_)^2)^(q_)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_.), x_Symbol] :> Simp[c^p*x^(4*p - 1)*(
(d + e*x^2)^(q + 1)/(e*(4*p + 2*q + 1))), x] + Dist[1/(e*(4*p + 2*q + 1)), Int[(d + e*x^2)^q*ExpandToSum[e*(4*
p + 2*q + 1)*(a + b*x^2 + c*x^4)^p - d*c^p*(4*p - 1)*x^(4*p - 2) - e*c^p*(4*p + 2*q + 1)*x^(4*p), x], x], x] /
; FreeQ[{a, b, c, d, e, q}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && IGtQ[p, 0] &&  !LtQ[
q, -1]

Rubi steps \begin{align*} \text {integral}& = \frac {c x^3 \sqrt {d+e x^2}}{4 e}+\frac {\int \frac {4 a e-(3 c d-4 b e) x^2}{\sqrt {d+e x^2}} \, dx}{4 e} \\ & = -\frac {(3 c d-4 b e) x \sqrt {d+e x^2}}{8 e^2}+\frac {c x^3 \sqrt {d+e x^2}}{4 e}-\frac {1}{8} \left (-8 a-\frac {d (3 c d-4 b e)}{e^2}\right ) \int \frac {1}{\sqrt {d+e x^2}} \, dx \\ & = -\frac {(3 c d-4 b e) x \sqrt {d+e x^2}}{8 e^2}+\frac {c x^3 \sqrt {d+e x^2}}{4 e}-\frac {1}{8} \left (-8 a-\frac {d (3 c d-4 b e)}{e^2}\right ) \text {Subst}\left (\int \frac {1}{1-e x^2} \, dx,x,\frac {x}{\sqrt {d+e x^2}}\right ) \\ & = -\frac {(3 c d-4 b e) x \sqrt {d+e x^2}}{8 e^2}+\frac {c x^3 \sqrt {d+e x^2}}{4 e}+\frac {\left (3 c d^2-4 b d e+8 a e^2\right ) \tanh ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d+e x^2}}\right )}{8 e^{5/2}} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.28 (sec) , antiderivative size = 93, normalized size of antiderivative = 0.96 \[ \int \frac {a+b x^2+c x^4}{\sqrt {d+e x^2}} \, dx=\frac {\sqrt {d+e x^2} \left (-3 c d x+4 b e x+2 c e x^3\right )}{8 e^2}+\frac {\left (3 c d^2-4 b d e+8 a e^2\right ) \text {arctanh}\left (\frac {\sqrt {e} x}{-\sqrt {d}+\sqrt {d+e x^2}}\right )}{4 e^{5/2}} \]

[In]

Integrate[(a + b*x^2 + c*x^4)/Sqrt[d + e*x^2],x]

[Out]

(Sqrt[d + e*x^2]*(-3*c*d*x + 4*b*e*x + 2*c*e*x^3))/(8*e^2) + ((3*c*d^2 - 4*b*d*e + 8*a*e^2)*ArcTanh[(Sqrt[e]*x
)/(-Sqrt[d] + Sqrt[d + e*x^2])])/(4*e^(5/2))

Maple [A] (verified)

Time = 0.27 (sec) , antiderivative size = 72, normalized size of antiderivative = 0.74

method result size
risch \(\frac {x \left (2 c \,x^{2} e +4 b e -3 c d \right ) \sqrt {e \,x^{2}+d}}{8 e^{2}}+\frac {\left (8 a \,e^{2}-4 b d e +3 c \,d^{2}\right ) \ln \left (x \sqrt {e}+\sqrt {e \,x^{2}+d}\right )}{8 e^{\frac {5}{2}}}\) \(72\)
pseudoelliptic \(\frac {\left (a \,e^{2}-\frac {1}{2} b d e +\frac {3}{8} c \,d^{2}\right ) \operatorname {arctanh}\left (\frac {\sqrt {e \,x^{2}+d}}{x \sqrt {e}}\right )+\frac {\left (\left (\frac {c \,x^{2}}{2}+b \right ) e^{\frac {3}{2}}-\frac {3 c d \sqrt {e}}{4}\right ) \sqrt {e \,x^{2}+d}\, x}{2}}{e^{\frac {5}{2}}}\) \(73\)
default \(\frac {a \ln \left (x \sqrt {e}+\sqrt {e \,x^{2}+d}\right )}{\sqrt {e}}+c \left (\frac {x^{3} \sqrt {e \,x^{2}+d}}{4 e}-\frac {3 d \left (\frac {x \sqrt {e \,x^{2}+d}}{2 e}-\frac {d \ln \left (x \sqrt {e}+\sqrt {e \,x^{2}+d}\right )}{2 e^{\frac {3}{2}}}\right )}{4 e}\right )+b \left (\frac {x \sqrt {e \,x^{2}+d}}{2 e}-\frac {d \ln \left (x \sqrt {e}+\sqrt {e \,x^{2}+d}\right )}{2 e^{\frac {3}{2}}}\right )\) \(127\)

[In]

int((c*x^4+b*x^2+a)/(e*x^2+d)^(1/2),x,method=_RETURNVERBOSE)

[Out]

1/8*x*(2*c*e*x^2+4*b*e-3*c*d)*(e*x^2+d)^(1/2)/e^2+1/8*(8*a*e^2-4*b*d*e+3*c*d^2)/e^(5/2)*ln(x*e^(1/2)+(e*x^2+d)
^(1/2))

Fricas [A] (verification not implemented)

none

Time = 0.32 (sec) , antiderivative size = 174, normalized size of antiderivative = 1.79 \[ \int \frac {a+b x^2+c x^4}{\sqrt {d+e x^2}} \, dx=\left [\frac {{\left (3 \, c d^{2} - 4 \, b d e + 8 \, a e^{2}\right )} \sqrt {e} \log \left (-2 \, e x^{2} - 2 \, \sqrt {e x^{2} + d} \sqrt {e} x - d\right ) + 2 \, {\left (2 \, c e^{2} x^{3} - {\left (3 \, c d e - 4 \, b e^{2}\right )} x\right )} \sqrt {e x^{2} + d}}{16 \, e^{3}}, -\frac {{\left (3 \, c d^{2} - 4 \, b d e + 8 \, a e^{2}\right )} \sqrt {-e} \arctan \left (\frac {\sqrt {-e} x}{\sqrt {e x^{2} + d}}\right ) - {\left (2 \, c e^{2} x^{3} - {\left (3 \, c d e - 4 \, b e^{2}\right )} x\right )} \sqrt {e x^{2} + d}}{8 \, e^{3}}\right ] \]

[In]

integrate((c*x^4+b*x^2+a)/(e*x^2+d)^(1/2),x, algorithm="fricas")

[Out]

[1/16*((3*c*d^2 - 4*b*d*e + 8*a*e^2)*sqrt(e)*log(-2*e*x^2 - 2*sqrt(e*x^2 + d)*sqrt(e)*x - d) + 2*(2*c*e^2*x^3
- (3*c*d*e - 4*b*e^2)*x)*sqrt(e*x^2 + d))/e^3, -1/8*((3*c*d^2 - 4*b*d*e + 8*a*e^2)*sqrt(-e)*arctan(sqrt(-e)*x/
sqrt(e*x^2 + d)) - (2*c*e^2*x^3 - (3*c*d*e - 4*b*e^2)*x)*sqrt(e*x^2 + d))/e^3]

Sympy [A] (verification not implemented)

Time = 0.34 (sec) , antiderivative size = 114, normalized size of antiderivative = 1.18 \[ \int \frac {a+b x^2+c x^4}{\sqrt {d+e x^2}} \, dx=\begin {cases} \left (a - \frac {d \left (b - \frac {3 c d}{4 e}\right )}{2 e}\right ) \left (\begin {cases} \frac {\log {\left (2 \sqrt {e} \sqrt {d + e x^{2}} + 2 e x \right )}}{\sqrt {e}} & \text {for}\: d \neq 0 \\\frac {x \log {\left (x \right )}}{\sqrt {e x^{2}}} & \text {otherwise} \end {cases}\right ) + \sqrt {d + e x^{2}} \left (\frac {c x^{3}}{4 e} + \frac {x \left (b - \frac {3 c d}{4 e}\right )}{2 e}\right ) & \text {for}\: e \neq 0 \\\frac {a x + \frac {b x^{3}}{3} + \frac {c x^{5}}{5}}{\sqrt {d}} & \text {otherwise} \end {cases} \]

[In]

integrate((c*x**4+b*x**2+a)/(e*x**2+d)**(1/2),x)

[Out]

Piecewise(((a - d*(b - 3*c*d/(4*e))/(2*e))*Piecewise((log(2*sqrt(e)*sqrt(d + e*x**2) + 2*e*x)/sqrt(e), Ne(d, 0
)), (x*log(x)/sqrt(e*x**2), True)) + sqrt(d + e*x**2)*(c*x**3/(4*e) + x*(b - 3*c*d/(4*e))/(2*e)), Ne(e, 0)), (
(a*x + b*x**3/3 + c*x**5/5)/sqrt(d), True))

Maxima [F(-2)]

Exception generated. \[ \int \frac {a+b x^2+c x^4}{\sqrt {d+e x^2}} \, dx=\text {Exception raised: ValueError} \]

[In]

integrate((c*x^4+b*x^2+a)/(e*x^2+d)^(1/2),x, algorithm="maxima")

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(e>0)', see `assume?` for more
details)Is e

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 81, normalized size of antiderivative = 0.84 \[ \int \frac {a+b x^2+c x^4}{\sqrt {d+e x^2}} \, dx=\frac {1}{8} \, \sqrt {e x^{2} + d} {\left (\frac {2 \, c x^{2}}{e} - \frac {3 \, c d e - 4 \, b e^{2}}{e^{3}}\right )} x - \frac {{\left (3 \, c d^{2} - 4 \, b d e + 8 \, a e^{2}\right )} \log \left ({\left | -\sqrt {e} x + \sqrt {e x^{2} + d} \right |}\right )}{8 \, e^{\frac {5}{2}}} \]

[In]

integrate((c*x^4+b*x^2+a)/(e*x^2+d)^(1/2),x, algorithm="giac")

[Out]

1/8*sqrt(e*x^2 + d)*(2*c*x^2/e - (3*c*d*e - 4*b*e^2)/e^3)*x - 1/8*(3*c*d^2 - 4*b*d*e + 8*a*e^2)*log(abs(-sqrt(
e)*x + sqrt(e*x^2 + d)))/e^(5/2)

Mupad [F(-1)]

Timed out. \[ \int \frac {a+b x^2+c x^4}{\sqrt {d+e x^2}} \, dx=\int \frac {c\,x^4+b\,x^2+a}{\sqrt {e\,x^2+d}} \,d x \]

[In]

int((a + b*x^2 + c*x^4)/(d + e*x^2)^(1/2),x)

[Out]

int((a + b*x^2 + c*x^4)/(d + e*x^2)^(1/2), x)